/*
package NiuKe;

import java.util.*;

*/
/**
 * @Description:
 * @Author: Hanzao
 * @Date: 2022/06/17/13:12
 *//*

public class HJ81 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s1 = scanner.nextLine();
        String s2 = scanner.nextLine();
        Set<Character> set = new HashSet();
        for(int i=0;i<s2.length();i++){
            set.add(s2.charAt(i));
        }
        boolean tmp = true;
        for(int i=0;i<s1.length();i++){
            if(!set.contains(s1.charAt(i))){
                tmp = false;
                break;
            }
        }
        System.out.println(tmp);
    }
}
*/
